﻿
using Furion.DataValidation;

namespace Admin.NET.Application.Service;


public class InvKuCunInput
{
    // "租户Id"
    public long TenantId { get; set; }
    // "主键Id"
    public long Id { get; set; }

    // "献血码"
    public string xianXueMa { get; set; } = "";

    // "产品码(产品Id)"
    public string chanPinId { get; set; } = "";

    // "血液名称（统一取产品名）"
    public string mingCheng { get; set; } = "";

    // "品种Id"
    public long pinZhongId { get; set; }

    // "大类（枚举值）"
    public string daLei { get; set; } = "";

    // "院区Id"
    public long yuanQuId { get; set; }

    // "ABO"
    public string abo { get; set; } = "";

    // "RhD"
    public string rhD { get; set; } = "";

    // "容量"
    public decimal rongLiang { get; set; }

    // "单位"
    public string? danWei { get; set; }

    // "价格"
    public decimal? jiaGe { get; set; }

    // "库存状态"
    public string kuCunZhuangTai { get; set; } = "";

    // "特殊处理"
    public string? teShuChuLi { get; set; }

    // "失效时间"
    public DateTime shiXiaoShiJian { get; set; }

    // "采血时间"
    public DateTime? caiXueShiJian { get; set; }

    // "制备时间"
    public DateTime? zhiBeiShiJian { get; set; }

    // "回收状态"
    public string? huiShouZhuangTai { get; set; }

    // "来源Id"
    public long? laiYuanId { get; set; }

    // "血袋外观"
    public string? xueDaiWaiGuan { get; set; }

    // "自编号"
    public string? ziBianHao { get; set; }

    // "复核ABO"
    public string? fuHeABO { get; set; }

    // "复核RhD"
    public string? fuHeRhD { get; set; }

    // "Rh分型"
    public string? rhFenXing { get; set; }

    // "入库时间"
    public DateTime ruKuShiJian { get; set; }

    // ""
    public string remark { get; set; } = "";

}

// 更新库存, 只能更新部分字段
public class InvKuCunUpdateInput
{
    // "主键Id"
    public long Id { get; set; }

    // "院区Id"
    public long yuanQuId { get; set; }

    // "价格"
    public decimal? jiaGe { get; set; }

    // "库存状态"
    public string kuCunZhuangTai { get; set; } = "";

    // "特殊处理"
    public string? teShuChuLi { get; set; }

    // "回收状态"
    public string? huiShouZhuangTai { get; set; }

    // "来源Id"
    public long? laiYuanId { get; set; }

    // "血袋外观"
    public string? xueDaiWaiGuan { get; set; }

    // "自编号"
    public string? ziBianHao { get; set; }

    // "复核ABO"
    public string? fuHeABO { get; set; }

    // "复核RhD"
    public string? fuHeRhD { get; set; }

    // "Rh分型"
    public string? rhFenXing { get; set; }

    // "入库时间"
    public DateTime ruKuShiJian { get; set; }

    // ""
    public string remark { get; set; } = "";

}

// 分页查询入参
public class InvKuCunPageInput
{
    public string xianXueMa { get; set; } // 献血码
    public List<string> listKuCunZhuangTai { get; set; } // 库存状态
    public decimal rongLiang { get; set; } // 容量
    public List<long> listYuanQuId { get; set; } // 入库院区ID
    public DateTime? ruKuStartTime { get; set; } // 入库开始时间
    public DateTime? ruKuEndTime { get; set; } // 入库结束时间
    public DateTime? shiXiaoStartTime { get; set; } // 失效开始时间
    public DateTime? shiXiaoEndTime { get; set; } // 失效结束时间
    public List<long> listXueYePinZhong { get; set; } // 血液品种列表
    public List<string> listABO { get; set; }// ABO血型列表
    public List<string> listRhD { get; set; } // RhD血型列表

    /// <summary>
    /// 当前页码
    /// </summary>
    [DataValidation(ValidationTypes.Numeric)]
    public virtual int Page { get; set; } = 1;

    /// <summary>
    /// 页码容量
    /// </summary>
    [Range(0, 1000, ErrorMessage = "页码容量超过最大限制")]
    [DataValidation(ValidationTypes.Numeric)]
    public virtual int PageSize { get; set; } = 20;
}


public class InvKuCunOutput : InvKuCunInput
{
    public bool IsDelete { get; set; }

    public DateTime CreateTime { get; set; }

    public long? CreateUserId { get; set; }

    public string? CreateUserName { get; set; }

    public DateTime? UpdateTime { get; set; }

    public long? UpdateUserId { get; set; }

    public string? UpdateUserName { get; set; }
}

// 库存是否存在
public class InvKuCunCheckCunZaiInput
{
    public string xianXueMa { get; set; }
    public string chanPinId { get; set; }
}